﻿<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%option explicit%>
<%
Dim RZ_IN
RZ_IN=1
%>
<!--#include file="../conn.inc.asp" -->
<!--#include file="admin_inc/admin.function.asp" -->
<%
'作者：山林客（ah_bill）
'博客：http://ruizhinet.blog.163.com
'网站：http://www.ruizhinet.cn
'本信息不会影响您网站的正常访问，请保留
checkadmin(1)
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>选择已上传的图片</title>
<link type="text/css" href="style/style.css" rel="stylesheet" rev="stylesheet"/>
<script type="text/javascript" language="javascript" src="admin_js/net.js"></script>
<script type="text/javascript" src="admin_js/common.js"></script>
</head>
<body onload="ajax_setFolder(document.getElementById('subdir'));">
请选择目录：
<select name="subdir" id="subdir" onchange="ajax_setFolder(this);">
<option value="">根目录</option>
<%
dim rootuploadpath
dim fso,objFolder,objSubFolders,objSubFolder,subpath
dim appPath
appPath=replace(LCase(Request.ServerVariables("PATH_INFO")), "admin/selectphoto.asp","" )
If Left(RZ_UPLOAD_PATH,1)="/" Then
	rootuploadpath = RZ_UPLOAD_PATH&"/"
Else
	rootuploadpath = appPath&RZ_UPLOAD_PATH&"/"
End If
set fso=server.CreateObject("scripting.filesystemobject")
on error resume next
set objFolder=fso.GetFolder(Server.Mappath(rootuploadpath))
set objSubFolders=objFolder.Subfolders
for each objSubFolder in objSubFolders 
subpath="/" + objSubFolder.name
Response.Write("<option value='"&subpath&"'")
response.Write(">"&objSubFolder.name&"</option>")
next
set objFolder=nothing
set objSubFolders=nothing
set fso=nothing
%>
</select>
<div id="selectphotolayout">
<div id="previewPhoto"></div>
<div id="selectphotolist"></div>
</body>
</html>